using System;
using System.Collections.Generic;
using System.Text;

using System.Reflection;

namespace DAL
{
    public class DALFactory
    {
        private static readonly string AssemblyName = "DAL";

        public static IEmployeeDAL CreateEmployeeDAL()
        {
            string className = AssemblyName + ".Impl.EmployeeDALImpl";
            return (IEmployeeDAL)Assembly.Load(AssemblyName).CreateInstance(className);
        }

        public static IRoleDAL CreateRoleDAL()
        {
            string className = AssemblyName + ".Impl.RoleDALImpl";
            return (IRoleDAL)Assembly.Load(AssemblyName).CreateInstance(className);
        }

        public static IFuncDAL CreateFuncDAL()
        {
            string className = AssemblyName + ".Impl.FuncDALImpl";
            return (IFuncDAL)Assembly.Load(AssemblyName).CreateInstance(className);
        }

        public static IRoleFuncDAL CreateRoleFuncDAL()
        {
            string className = AssemblyName + ".Impl.RoleFuncDALImpl";
            return (IRoleFuncDAL)Assembly.Load(AssemblyName).CreateInstance(className);
        }

        public static ICustomDAL CreateCustomDAL()
        {
            string className = AssemblyName + ".Impl.CustomDALImpl";
            return (ICustomDAL)Assembly.Load(AssemblyName).CreateInstance(className);
        }

        public static ICustomCargoDAL CreateCustomCargoDAL()
        {
            string className = AssemblyName + ".Impl.CustomCargoDALImpl";
            return (ICustomCargoDAL)Assembly.Load(AssemblyName).CreateInstance(className);
        }

        public static ICargoCarsDAL CreateCargoCarsDAL()
        {
            string className = AssemblyName + ".Impl.CargoCarsDALImpl";
            return (ICargoCarsDAL)Assembly.Load(AssemblyName).CreateInstance(className);
        }

        public static IVehicleDAL CreateVehicleDAL()
        {
            string className = AssemblyName + ".Impl.VehicleDALImpl";
            return (IVehicleDAL)Assembly.Load(AssemblyName).CreateInstance(className);
        }

        public static IDriverDAL CreateDriverDAL()
        {
            string className = AssemblyName + ".Impl.DriverDALImpl";
            return (IDriverDAL)Assembly.Load(AssemblyName).CreateInstance(className);
        }

        public static ICostDAL CreateCostDAL()
        {
            string className = AssemblyName + ".Impl.CostDALImpl";
            return (ICostDAL)Assembly.Load(AssemblyName).CreateInstance(className);
        }

        public static ICarriersDispatchDAL CreateCarriersDispatchDAL()
        {
            string className = AssemblyName + ".Impl.CarriersDispatchDALImpl";
            return (ICarriersDispatchDAL)Assembly.Load(AssemblyName).CreateInstance(className);
        }

        public static ICarriersDAL CreateCarriersDAL()
        {
            string className = AssemblyName + ".Impl.CarriersDALImpl";
            return (ICarriersDAL)Assembly.Load(AssemblyName).CreateInstance(className);
        }

    }
}
